package service;

public enum ServerCommand {
        goodbye("server> goodbye"),
        auth("server> Enter login and password:"),
        ok("server> Welcome to chat. You are in default channel"),
        unknown("server> Unknown command"),
        tryAgain("server> Do you want to try again? Enter y/n: "),
        privateMessage("To send private message enter command of the form: /private to login: message");
       
        private String serverCommand;
       
       
        private ServerCommand (final String string) {
                this.serverCommand = string;
        }
       
        public String toString() {
                return this.serverCommand;
        }
       
        static public ServerCommand getType(String type) {
        for (ServerCommand command: ServerCommand.values()) {
                if (type.equals(command.toString())){
                return command;
            }
        }
        return unknown;
    }
}

